package org.anno.chunkdb.backend;

/**
 * Implementation of the rank to offset mapping as an explicit array.
 */
public class IndexedColumn {

  /**
   * Rank order of rows s.t. v[index[i]] <= v[index[i+1]].
   */
  protected final int[] index;

  public IndexedColumn(int[] index) {
    this.index = index;
  }

  public int rankToOffset(int i) {
    return index[i];
  }
}
